<form action="{:request()->url()}" autocomplete="off" class="layui-form layui-card layui-form-pane" data-auto="true" method="post">
    <div class="layui-card-body padding-40" >

        <div class="layui-form-item relative block">
            <div class="layui-inline margin-left-5">
                <span class="color-green font-w7 label-required-prev">字段名称</span>
                <span class="color-desc margin-left-5">中文</span>
                    <input type="text" name="title"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$vo.title|default=''}"> 

            </div>
            <div class="layui-inline">
                <span class="color-green font-w7 label-required-prev">字段名</span>
                <span class="color-desc margin-left-5">英文</span>
                    <input type="text" name="name"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$vo.name|default=''}"> 
    
            </div>


            <div class="layui-inline margin-left-5">
                <span class="color-green font-w7 label-required-prev">类型</span>
                <span class="color-desc margin-left-5"></span>
                    <select name="type" lay-verify="">
                        {foreach $type as $k => $v}
                        <option value="{$k}" {if isset($vo.type) && $vo.type== $k}selected{/if}>{$v}</option>
                        {/foreach}
                    </select> 
            </div>
            <div class="layui-inline margin-left-5">
                <span class="color-green font-w7 label-required-prev">备注</span>
                <span class="color-desc margin-left-5"></span>
                    <input type="text" name="note"  placeholder="" autocomplete="off" class="layui-input" value="{$vo.note|default=''}"> 
            </div>
        </div>
       <div class="layui-row">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <label class="layui-form-label">列表</label>
                        <input type="radio" name="list" value="0" title="隐藏" {if isset($vo.list) && $vo.list == 0 } checked{/if}>
                        <input type="radio" name="list" value="1" title="显示" {if isset($vo.list) && $vo.list == 1 || !isset($vo.list)} checked{/if}>
                    </div>
                    <div class="layui-input-inline">
                        <label class="layui-form-label">搜索</label>
                        <input type="radio" name="search" value="0" title="隐藏" {if isset($vo.search) && $vo.search == 0 || !isset($vo.search)} checked{/if}>
                        <input type="radio" name="search" value="1" title="显示" {if isset($vo.search) && $vo.search == 1 } checked{/if}>
                    </div>
                </div>
            </div>
        <div class="hr-line-dashed"></div>
        <input name='table_id' type='hidden' value='{:input("table_id")}'>
        {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存数据</button>
            <button class="layui-btn layui-btn-danger" data-close type='button'>取消编辑</button>
        </div>
    </div>
</form>

{block name='style'}
<style>
    .layui-form-select dl{ max-height:180px; }
</style>
{/block}

{block name='script'}
<script>
// 脚本部分，默认加载了所有插件
    $(function () {
        // layui 表单组件初始化
        layui.form.render();
        // layui 组件动作初始化
        layui.element.render();
    });
</script>
{/block}
